package com.sizu.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;

import java.io.Serializable;
import java.util.List;


import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 赵玉玺
 * @since 2020-03-14
 */
@Data
@Accessors(chain = true)
public class TGoodstype extends Model<TGoodstype> {

    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO)
private Integer id;
    @JsonProperty(value = "label")
    private String name;

    private Integer pId;

    private Integer state;

    private String icon;
    @TableField(exist = false)
    List<TGoodstype> children;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
